<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:c="http://xmlns.jcp.org/jsp/jstl/core">
    <ui:composition template="/shared/_layout.xhtml">
        <ui:define name="title">
            Espace d'administration de BooXtore.com
        </ui:define>
        <ui:define name="css">
            <h:outputStylesheet library="css" name="form.css"/>
        </ui:define>
        <ui:define name="content">
            <f:event listener="#{accountLogin.isNotLogged()}" type="preRenderView" />
            <h1>Gestion des éditeur.</h1>
            <h2>Modification, suppression d'un éditeur existante</h2>
            <p>
                <h:messages errorClass="errorMessage" infoClass="infoMessage" warnClass="warnMessage"/>
            </p>
            <c:forEach items="#{editorManager.editors}" var="item">
                <h:form>
                    <p>
                        <h:inputText value="#{item.name}" required="true" maxlength="45" size="45" label="Nom"/>
                        <h:commandButton action="#{editorManager.update(item)}" value="Modifier"/>
                        <h:commandButton action="#{editorManager.delete(item.IDeditors)}" value="Supprimer"/>
                    </p>
                </h:form>
            </c:forEach>
            <p>
                <h:link outcome="/index" class="back" value="Retour"/>
            </p>
        </ui:define>
    </ui:composition>
</html>